
  function submitTaskFrm(){
	  //新增的任务保存
		$.ajax({
			type: "POST",
			url: "taskManage/createTask.do",
		 	data: $("#createTaskFrom").serialize(),
		 	success:function(result){
		 		var jsonString = JSON.stringify(result);
		 		var data = JSON.parse(jsonString);			 		
		 		if(data.status == "SUCCESS"){
		 			//window.history.back();
		 			window.parent.location.reload();

		 		}else{
		 			layer.alert("提交失败");
		 		}
		 	},
		 	error:function(xhr){
		 		alert(xhr.status);
		 	}
		});
	}	
		//修改表单提交
	function updateTaskFrm(){
			$.ajax({
				type: "POST",
				url: "taskManage/updateTask.do",
			 	data: $("#updateTaskForm").serialize(),
			 	success:function(result){			 		
			 		var jsonString = JSON.stringify(result);
			 		var data = JSON.parse(jsonString);			 		
			 		if(data.status == "SUCCESS"){
			 			//window.history.back();
			 			window.parent.location.reload();
			 		}else{
			 			layer.alert("提交失败");
			 		}
			 	},
			 	error:function(xhr){
			 		alert(xhr.status);
			 	}
			});
      }
	
	//修改cron表达式  表单提交
	function updateTaskCronFrm(){
			$.ajax({
				type: "POST",
				url: "taskManage/updateTaskCron.do",
			 	data: $("#updateTaskCronForm").serialize(),
			 	success:function(result){			 		
			 		var jsonString = JSON.stringify(result);
			 		var data = JSON.parse(jsonString);			 		
			 		if(data.status == "SUCCESS"){
			 			//window.history.back();
			 			window.parent.location.reload();
			 		}else{
			 			layer.alert("提交失败");
			 		}
			 	},
			 	error:function(xhr){
			 		alert(xhr.status);
			 	}
			});
      }
	
	

